import { RouteView } from '@/layouts'

export default [
  {
    path: '/saasGoodsAgent',
    name: 'saasGoodsAgent',
    component: RouteView,
    redirect: '/saasGoodsAgentGoods',
    meta: { title: '代理', icon: 'profile', permission: ['saasGoodsAgent'] },
    children: [
      {
        path: '/saasGoodsAgentGoods',
        name: 'saasGoodsAgentGoods',
        component: () => import('@/views/daili/saasGoodsAgentGoods'),
        meta: { title: '代理产品', permission: ['saasGoodsAgentGoods'] },
      },
      {
        path: '/saasGoodsAgentSetting',
        name: 'saasGoodsAgentSetting',
        component: () => import('@/views/daili/saasGoodsAgentSetting'),
        meta: { title: '申请产品', permission: ['saasGoodsAgentSetting'] },
      },
    ],
  },
  {
    path: '/saasGoodsAgentOrder',
    name: 'saasGoodsAgentOrder',
    component: RouteView,
    redirect: '/saasGoodsAgentOrder',
    meta: { title: '订单', icon: 'profile', permission: ['saasGoodsAgentOrder'] },
    children: [
      {
        path: '/saasGoodsAgentOrder',
        name: 'saasGoodsAgentOrder',
        component: () => import('@/views/daili/order/purchaseOrder'),
        meta: { title: '代理订单', permission: ['saasGoodsAgentOrder'] },
      },
      {
        path: '/saasGoodsAgentOrderDetail',
        name: 'saasGoodsAgentOrderDetail',
        hidden: true,
        component: () => import('@/views/daili/order/purchaseDetail'),
        meta: { title: '代理订单', permission: ['saasGoodsAgentOrder'] },
      },
    ],
  },
  {
    path: '/saasGoodsAgentFinance',
    name: 'saasGoodsAgentFinance',
    component: RouteView,
    redirect: '/saasGoodsAgentFinance',
    meta: { title: '财务', icon: 'profile', permission: ['saasGoodsAgentFinance'] },
    children: [
      {
        path: '/saasGoodsAgentFinance',
        name: 'saasGoodsAgentFinance',
        component: () => import('@/views/daili/AgencyWithdraw'),
        meta: { title: '提现明细', permission: ['saasGoodsAgentFinance'] },
      },
      {
        path: '/saasGoodsAgentCommission',
        name: 'saasGoodsAgentCommission',
        component: () => import('@/views/daili/AgencyIncome'),
        meta: { title: '佣金列表', permission: ['saasGoodsAgentCommission'] },
      },
    ],
  },
]